﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchPropertyEdit.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.SearchProperty.SearchPropertyEdit"
    ValidateRequest="False" %>

<%@ Import Namespace="ZLCMS.Business" %>
<%@ Register TagPrefix="fc" TagName="FileControl" Src="~/SystemManage/Control/FileControl/FileControl.ascx " %>
<%@ Register TagPrefix="ddt" TagName="DropDownTreeControl" Src="~/SystemManage/Control/ddt/DropDownTreeControl.ascx " %>
<form id="pageForm" method="post" runat="Server" class="pageForm required-validate"
onsubmit="return validateCallback(this, navTabAjaxDone);" action="/SystemManage/Basics/SearchProperty/SearchPropertyEdit.aspx">
<input runat="Server" id="doc_id" type="hidden" />
<input runat="Server" ID="doc_kind" type="hidden" />
<input runat="server" id="doc_cid" type="hidden" name="cid"/>
<div class="pageContent" layoutH="36">
    <div class="pageFormContent">
    <dl class="nowrap">
            <dt>分类： </dt>
            <dd>
                  <%= _category==null?"未知分类": _category.CategoryName %>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>属性名称：</dt>
            <dd>
                <asp:textbox id="txt_property_value" runat="server" class="required" ></asp:textbox>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>排序：</dt>
            <dd>
                <asp:textbox id="txt_sort" runat="server" class="digits" ></asp:textbox>（数字越小排序越靠前）
            </dd>
        </dl>
           <dl class="nowrap">
            <dt>是否有下级：</dt>
            <dd> 
            <asp:checkbox runat="server" id="ckb_has_children"></asp:checkbox>
            </dd>
        </dl>
           <dl class="nowrap">
            <dt>上级：</dt>
            <dd> 
              <asp:dropdownlist runat="server" id="ddl_property" ></asp:dropdownlist>
            </dd>
        </dl>
       
        <% if (_categorySearchProperty != null)
           {
        %>
        <dl class="nowrap">
            <dt>搜索属性项目：</dt>
            <dd>
                &nbsp;</dd>
        </dl>
        <%
            }
        %>
    </div>
    <% if (_categorySearchProperty != null)
       {
    %>
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href='/SystemManage/Basics/SearchProperty/EditSearchPropertyItem.aspx?pid=<%= _categorySearchProperty == null? 0:_categorySearchProperty.Id%>&cid=<%=Request["cid"] %>'  target="dialog" rel="shopaddredit" title="分类搜索属性项-添加" max="false" mask="true" minable="false"     width="400" height="250"><span>添加</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%">
        <thead>
            <tr>
             <%--   <th width="10%">
                   搜索属性ID
                </th>--%>
                <th width="10%">
                    属性项目名称
                </th>
              <%--  <th width="10%">
                   搜索值
                </th>
                <th width="10%">
                   属性项目值
                </th>--%>
                <th width="10%">
                   排序
                </th>
         <%--       <th width="10%">
                   属性类型
                </th>--%>
                <th width="10%">
                   操作
                </th>
            </tr>
        </thead>
        <tbody>
            <asp:repeater runat="server" id="rpt_property">
                <ItemTemplate>
		        <tr target="uid" rel='<%# Eval("Id")%>'>
			    <%--    <td><%# Eval("SearchPropertyId")%></td>--%>
			        <td><%# Eval("PropertyName")%></td>
               <%--      <td><%# Eval("PropertyValue")%></td>
			        <td><%# Eval("SearchValue")%></td>--%>
                     <td><%# Eval("Sort")%></td>
              <%--       <td><%# Eval("PropertyType")%></td>--%>
			        <td> 
			            <a href="/SystemManage/Basics/SearchProperty/EditSearchPropertyItem.aspx?pid=<%# Eval("SearchPropertyId")%>&cid=<%= Request["cid"] %>&uid=<%# Eval("Id")%>" target="dialog" title="分类搜索属性项编辑-编辑" 
			            rel="shopaddredit" max="false" mask="true" minable="false" width="400" height="250">编辑</a>&nbsp;&nbsp;
			            <a href="/SystemManage/Basics/SearchProperty/DeleteSearchPropertyItem.aspx?uid=<%# Eval("Id")%>" target="ajaxTodo" title="请确定要删除" warn="请选择一项">删除</a>
			        </td>
		        </tr>
                </ItemTemplate>
            </asp:repeater>
        </tbody>
    </table>
    <%
        }
    %>
</div>

<div class="formBar">
    <ul>
        <li>
            <div class="buttonActive">
                <div class="buttonContent">
                    <button onclick="if(collect){collect();}" type="submit">
                        保存</button></div>
            </div>
        </li>
        <li>
            <div class="button">
                <div class="buttonContent">
                    <button type="button" class="close">
                        取消</button></div>
            </div>
        </li>
    </ul>
</div>

</form>
